<script>
function excelform_submit() {
    var excelArr = ["xls"];
    if($("#excelId").val()==""){
    	alert("请选择需要导入的xls文件!");
    	return false;
    }else{
    	 var file = $("#excelId").val();
         var len = file.length;
         var ext = file.substring(len - 3, len).toLowerCase();
         if ($.inArray(ext, excelArr) == -1){
        	 alert("不是有效的xls文件!");
        	 return false;
         }
    }
    return true;
}
</script>
<!--top结束-->
<div class="mian">
	<div class="mian1">
		<div class="mian2">
			<!--left start--> 
			<?php $this->load->view('gdoing/common/left');?>
			<!--left end-->
			<!--right start-->
			<div class="right">
				<!--breadcrumb start-->
				<div class="righta"><?=$this->breadcrumb->generateHTML();?> </div>
				<!--breadcrumb end-->
				<!-- contents start -->
				<div id="contents">
					<div id="contents_container">
					<form action="<?=blang_url('product/products/'.$post_type)?>" method="post" enctype="multipart/form-data"  name="excelform"  onsubmit="return excelform_submit();" >
						<table cellpadding="0" cellspacing="0" id="table_forms" border="1">
						    <tr>
						      <td class="forms_left">上传EXCEL文件：</td>
						      <td><input name="excelFile" type="file" id="excelId" ></td>
						    </tr>
						    <tr>
						      <td colspan="2" align="center" >
								<input type="submit" value="提交" name="submits" />
						      </td>
						    </tr>
					   </table>
					</form>
				   </div>
				</div>
				<!-- contents end -->
			</div>
			<!--right end-->
		</div>
	</div>
</div>

